import Vue from 'vue'
import App from './App.vue'
import plugins from './plugins.js'
import 'bootstrap/dist/css/bootstrap.min.css'
//引入vue-resource 发送ajax请求
import vueResource from 'vue-resource'
//引入store
import store from './store'
//引入路由器
import VueRouter from 'vue-router'
//引入router
import router from './router'
//引入element-ui 全部引入
//import ElementUI from 'element-ui';
//import 'element-ui/lib/theme-chalk/index.css';
//按需引入
import {
    Button,
    Row,
    Rate
} from 'element-ui';


//关闭Vue的生产提示
Vue.config.productionTip = false
//Vue.use(ElementUI);
//使用element-ui 全局注册
Vue.component(Button.name, Button);
Vue.component(Row.name, Row);
Vue.component(Rate.name, Rate);

Vue.use(plugins)
Vue.use(vueResource)
Vue.use(VueRouter)

console.log(new Vue({
    render: h => h(App),
    store,
    router: router,
    beforeCreate() {
        Vue.prototype.$bus = this
    },
    mounted() {
        localStorage.setItem('auth', 'full')
    },
}).$mount('#app'))
